BeanShell has been updated from version 1.2b7 to 2.0b1. The new release of BeanShell brings support for scripted classes, static imports, mixins, better error reporting, improved performance, and various fixes.
A number of jEdit-specific changes are also present in this BeanShell version; they will eventually be merged back into the main BeanShell source tree.
A new preset BeanShell variable, wm is set to the view.getDockableWindowManager().
Previously plugins that wanted to provide BeanShell scripting commands had to source a BeanShell script on startup. This was slow. Now, BeanShell supports a “command path”. When an unresolved method name is entered, the command path is consulted for the method definition. Entries are added to the command path using the following method of the NameSpace class:
void addCommandPath(
String path, Class clas)
;
For example, if your plugin provides commands in the commands directory of the JAR file, you could call something like this:
BeanShell.getNameSpace().addCommandPath("/commands/", MyPlugin.class); |